package demo.demo03;

public class UseMethod1 {
    public static int late(int lateMinute, double salary) {
        int fakuan = 0;//罚款
        if (lateMinute < 11) {
            System.out.println("不能迟到！！警告一次");
        } else if (lateMinute < 21) {
            fakuan = 100;
        } else if (lateMinute < 31) {
            fakuan = 200;
        } else if (lateMinute < 61) {
            fakuan = (int) (salary / (2 * 21.75));//21.75指月平均工作日
        } else {
            fakuan = (int) (salary * 3 / (21.75));
        }
        System.out.println("吃到时间：" + lateMinute + "分钟！" + "\n罚款金额：" + fakuan + "RMB");
        return fakuan;
    }

    public static void main(String[] args) {
        late(12, 20000);
    }
}
